import { request, config } from 'utils';
import { stringify } from 'qs';
const {
  api: {
    recursivemgt: {
      transpond: {
        apigetalldevices
      }
    },
    datacenter: { apigetcurrentiprank, apigetalliprank,apifreship },
  },
} = config;

export function getCurrentIpRank(params) {
  return request(`${apigetcurrentiprank}?${stringify(params)}`);
}

export function getFreshIp(params) {
  return request(apifreship,{
    method: "POST",
    body: {
      ...params
    }
  })
}
export function getAllDevices(params) {
  return request(`${apigetalldevices}?${stringify(params)}`);
}

export function getAllIpRank(params) {
  return request(`${apigetalliprank}?${stringify(params)}`);
}


